<?php
namespace app\admin\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'username'  =>  'require|unique:tp_user',//必须跟上数据库名
        'email' =>  'email|unique:tp_user',
        'mobile_phone' =>  'unique:tp_user',
    ];


    protected $message  =   [
        'username.require' => '用户名必须填写',
        'username.unique'     => '用户名必须唯一',
        'email'   => 'email格式不正确',
        'email.unique'     => '邮箱必须唯一',
        'mobile_phone.unique'     => '手机号必须唯一',



    ];

}